package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ErpCommoditiesDetailsMapper;
import com.ruoyi.system.domain.ErpCommoditiesDetails;
import com.ruoyi.system.service.IErpCommoditiesDetailsService;

/**
 * 商品明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class ErpCommoditiesDetailsServiceImpl implements IErpCommoditiesDetailsService 
{
    @Autowired
    private ErpCommoditiesDetailsMapper erpCommoditiesDetailsMapper;

    /**
     * 查询商品明细
     * 
     * @param id 商品明细主键
     * @return 商品明细
     */
    @Override
    public ErpCommoditiesDetails selectErpCommoditiesDetailsById(Long id)
    {
        return erpCommoditiesDetailsMapper.selectErpCommoditiesDetailsById(id);
    }

    /**
     * 查询商品明细列表
     * 
     * @param erpCommoditiesDetails 商品明细
     * @return 商品明细
     */
    @Override
    public List<ErpCommoditiesDetails> selectErpCommoditiesDetailsList(ErpCommoditiesDetails erpCommoditiesDetails)
    {
        return erpCommoditiesDetailsMapper.selectErpCommoditiesDetailsList(erpCommoditiesDetails);
    }

    /**
     * 新增商品明细
     * 
     * @param erpCommoditiesDetails 商品明细
     * @return 结果
     */
    @Override
    public int insertErpCommoditiesDetails(ErpCommoditiesDetails erpCommoditiesDetails)
    {
        return erpCommoditiesDetailsMapper.insertErpCommoditiesDetails(erpCommoditiesDetails);
    }

    /**
     * 修改商品明细
     * 
     * @param erpCommoditiesDetails 商品明细
     * @return 结果
     */
    @Override
    public int updateErpCommoditiesDetails(ErpCommoditiesDetails erpCommoditiesDetails)
    {
        return erpCommoditiesDetailsMapper.updateErpCommoditiesDetails(erpCommoditiesDetails);
    }

    /**
     * 批量删除商品明细
     * 
     * @param ids 需要删除的商品明细主键
     * @return 结果
     */
    @Override
    public int deleteErpCommoditiesDetailsByIds(Long[] ids)
    {
        return erpCommoditiesDetailsMapper.deleteErpCommoditiesDetailsByIds(ids);
    }

    /**
     * 删除商品明细信息
     * 
     * @param id 商品明细主键
     * @return 结果
     */
    @Override
    public int deleteErpCommoditiesDetailsById(Long id)
    {
        return erpCommoditiesDetailsMapper.deleteErpCommoditiesDetailsById(id);
    }
}
